package com.ftg.learn.cloud.customer.controller;

import com.ftg.learn.cloud.customer.pojo.Dept;
import com.ftg.learn.cloud.customer.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author TJQ
 * @data 2019/10/30 11:03
 */

@RestController
@CrossOrigin
public class DeptController {

    @Autowired
    DeptService deptService;

    @GetMapping("/showAll")
    public List<Dept> showAll(){
        return deptService.showAll();
    }

    @GetMapping("/showDemo")
    public String showDemo(){
        return "测试访问消费者。。。";
    }

}
